package com.yft.util;

public class RegexPattern{
	public final static String empty = "^\\s*$|^(\\d+|\\-){7,}$|";
	public final static String punctuation = "\uFF00-\uFFFF\t\n\\x0B\f\r-_/@.()、 ";
	public final static String pun = "-_(). ";

	/**
	 * 只含有汉字、数字、字母、下划线不能以下划线开头和结尾
	 */
	public final static String ALL1 = empty+"^(?!_)(?!.*?_$)[a-zA-Z0-9"+punctuation+"]+$";
	public final static String ALL1_ex = "只能是“数字、字母、常用标点";
	
	/**
	 * 只含有汉字、数字、字母、下划线不能以下划线开头和结尾
	 */
	public final static String ALL2 = empty+"^[a-zA-Z0-9\u4e00-\u9fa5"+punctuation+"]+$";
	public final static String ALL2_ex = "只能是“汉字、数字、字母、常用标点”";
	
	/**
	 * 只能有字母数字下划线@  并且不能以下划线@开头结尾
	 */
	public final static String LOGIN = "^(?!_)(?!.*?_$)[a-zA-Z0-9@_.]+$";
	public final static String LOGIN_ex = "只能是“是字母、数字、下划线、不能以下划线开头结尾”";
	
	public final static String PASSWORD = "^[a-zA-Z0-9]+$";
	public final static String PASSWORD_ex = "只能是字母、数字"; 
	
	/**
	 * 只含有数字
	 */
	public final static String NUM = empty+"^[0-9-() ]+$";
	public final static String NUM_ex = "只能是“数字”";
	
	/**
	 * 小写字母
	 */
	public final static String LETTER_S = "^[a-z]+$";
	public final static String LETTER_S_ex = "只能是小写字母";
	
	/**
	 * 只含有数字
	 */
	public final static String CHAR = empty+"^[a-zA-Z0-9\u4e00-\u9fa5\uFF00-\uFFFF"+pun+"]+$";
	//public final static String CHAR = "^(?:[\u4e00-\u9fa5]*\\w*\\s*)+$";
	public final static String CHAR_ex = "只能是“汉字、字母、数字、全角标点”";
}